//
//  SelectFieldViewController.h
//  MClient
//
//  Created by  史正烨 on 09-10-26.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MCControl.h"
#import "MCPopupViewController.h"

@interface SelectFieldViewController : MCTableViewController {
	NSMutableDictionary *fieldData;
	MCControl *valueField;
	NSMutableDictionary *field;	
	NSMutableArray *itemList;
	NSMutableDictionary *datas;
	NSString *fieldName;
    
    NSMutableArray *selectedItems;
}

@property (nonatomic,retain) NSMutableDictionary *fieldData;
@property (nonatomic,retain) MCControl *valueField;
@property (nonatomic,retain) NSMutableDictionary *field;
@property (nonatomic,retain) NSMutableArray *itemList;
@property (nonatomic,retain) NSMutableDictionary *datas;
@property (nonatomic,retain) NSString *fieldName;
@property (nonatomic,retain) NSMutableArray *selectedItems;

@end


typedef enum _SelectionType {
	Selection_NoData,
	Selection_HasData
}SelectionType;

@interface PopUpSelectFieldViewController : MCPopupViewController {
	NSMutableDictionary *fieldData;
	MCControl *valueField;
	NSMutableDictionary *field;	
	NSMutableArray *itemList;
	NSMutableDictionary *datas;
	NSString *fieldName;
	SelectionType selectionType;
	UIView*   footView;
	CGRect    tableViewFrame;
    
    NSMutableArray *selectedItems;

}

@property (nonatomic,retain) NSMutableDictionary *fieldData;
@property (nonatomic,retain) MCControl *valueField;
@property (nonatomic,retain) NSMutableDictionary *field;
@property (nonatomic,retain) NSMutableArray *itemList;
@property (nonatomic,retain) NSMutableDictionary *datas;
@property (nonatomic,retain) NSString *fieldName;
@property (nonatomic,retain) NSMutableArray *selectedItems;

@end